import Vue from 'vue'
// import VueRouter from 'vue-router'
import Home from '@/views/Home'
import Dingdan from '@/views/Dingdan'
import Fenlei from '@/views/Fenlei'
import My from '@/views/My'

// 1导入路由
import VueRouter from 'vue-router'
// 2让Vue使用VueRouter这个插件
Vue.use(VueRouter)
// 3创建路由对象
const router = new VueRouter({
  routes: [
    {
    path: '/',
    redirect:'/home',
    },
    {
      path: '/home',
      component:Home,
    },
    {
      path: '/dingdan',
      component:Dingdan,
    },
    {
      path: '/fenlei',
      component:Fenlei,
    },
    {
      path: '/my',
      component:My,
    },
  ]

})
export default router